package com.xzlf;


import java.util.concurrent.TimeUnit;

// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
    public static void main(String[] args) {
        TankFrame f = TankFrame.INSTANCE;
        // 初始化敌方坦克
//        int count = Integer.parseInt((String) PropertyMgr.get("inintCount"));
//        for (int i = 0; i < count; i++) {
//            f.tanks.add(new Tank(50 + i * 80, 200, Dir.DOWN, true, Group.BAD, f));
//        }

        ResourceMgr.pool.execute(() -> {
            while (true) {
                try {
                    TimeUnit.MILLISECONDS.sleep(50);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
                f.repaint();
            }
        });

        f.client.connect();
    }
}